<template>
  <div>
    ds
  </div>
</template>

<script setup>
import { useAttrs, inject, defineProps, defineEmits } from 'vue';

const inj = inject('sessionData') //结合provide/inject  
console.log("--------------inject执行了", inj.name);

//会接收父组件有所的参数和事件
const { data } = useAttrs()
console.log(data);

//返回指定的props
const props = defineProps()
console.log(props);

//defineEmits 返回指定事件
const emit = defineEmits(["changeLocation"])
console.log(emit);

</script>

<style scoped lang='scss'></style>
